Bakery's algorithm example